package com.xiao.mp3.util;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class LoadProperties {
//	private static String fileName = LoadProperties.class.getClassLoader()
//			.getResource("init.properties").getPath();
	private static Properties properties = null;
	
	public static Properties getProperties() {
		if(properties == null){
			properties = new Properties();
			try {
				// InputStream inputStream = LoadProperties.class.getClassLoader()
				// .getResourceAsStream(fileName);
				InputStream inputStream = LoadProperties.class.getResourceAsStream("/init.properties");
				properties.load(inputStream);
				inputStream.close(); // �ر���
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return properties;
	}

}
